﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Gui/masterPage.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="OnlineStore.Gui.Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentTitle" runat="server">
    <h1>Chào mừng bạn đến với ONLINESTORE</h1>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentCenter" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentTop" runat="server">
    <h1>Đăng nhập</h1>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <% if (Session["user"]==null)
       { 
    %>
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
        <p>Vui lòng Đăng nhập </p>
        <br />
        <table>
        <tbody> 
            <tr>
            <td><b>Tên Đăng nhập</b></td>
            <td><asp:TextBox ID="tb_Username" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
            <td><b>Mật khẩu</b></td>
            <td><asp:TextBox ID="tb_PassWord" runat="server" TextMode="Password"></asp:TextBox></td>
            </tr>
        </tbody>
        </table>
        <br />
        <asp:Label ID="lb_warning_login" runat="server" Visible="false" CssClass="warning" >Thông tin đăng nhập không đúng</asp:Label>
    </div>
    <div class="buttons">
        <table>
          <tbody><tr>
            <td width="130px">
                </td>
            <td align="right">
                <asp:LinkButton ID="bt_Submit" CssClass="button1" runat="server" Width="100px" onclick="OnSubmit"
                    ><span>Đăng nhập</span></asp:LinkButton>
             </td>
          </tr>
        </tbody></table>
      </div>
    <% 
       }
       else
       {
    %>
        <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
            <b> Đã Đăng nhập</b>
            <br />
                Xin chào 
                <asp:HyperLink ID="goTOAccount" NavigateUrl="~/Gui/Account.aspx" runat="server">
                    
                <b>  <%=((OnlineStore.Dal.tbCustomer) Session["user"]).Username %></b>
                </asp:HyperLink> <asp:HyperLink ID="logOut" NavigateUrl="/Gui/Login.aspx?logout=true" runat="server" CssClass="button1"><span>Đăng xuất</span></asp:HyperLink><br />
            <br />
            <br />
            <asp:HyperLink ID="HyperLink1" NavigateUrl="/" runat="server"><b>Về trang chủ</b></asp:HyperLink><br />

        </div>
    <%
       }
    %>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentButtom" runat="server">
    <h1>
        <asp:Label ID="lb_Title_Buttom" runat="server"> Nếu bạn chưa có tài khoản</asp:Label>
       
    </h1>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Contentlist" runat="server">
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
    
        <asp:HyperLink ID="HL_register" runat="server" NavigateUrl="~/Gui/Register.aspx">Đăng ký tài khoản</asp:HyperLink>
    </div>
</asp:Content>
<asp:Content ID="content7" ContentPlaceHolderID="ContentLogin" runat="server">
    <asp:HyperLink ID="HL_tab_login" runat="server" NavigateUrl="/gui/Login.aspx" ForeColor="Red">(Đăng nhập) </asp:HyperLink> |
    <asp:HyperLink ID="HL_tab_Logout" Visible="false" runat="server" NavigateUrl="/gui/Login.aspx?logout=true">Đăng Xuất | </asp:HyperLink>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="ContentCartRight" runat="server">
        <asp:GridView ID="ListCartRight" runat="server" AutoGenerateColumns="False" 
           GridLines="None">
            <Columns>
                <asp:BoundField DataField="NumberOrder" SortExpression="NumberOrder" 
                    DataFormatString="{0} x " >
                
                <ControlStyle Width="10px" />
                </asp:BoundField>
                
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataTextField="Product_Name" 
                    DataNavigateUrlFormatString="/gui/ProductDetail.aspx?id={0}" />
            </Columns>
        </asp:GridView>
    <br>
    <table cellpadding="0" cellspacing="0" align="right" style="display:inline-block;">
     <tbody>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tiền hàng:</b></span></td>
            <td align="right">
                <asp:Label ID="lb_Sum_product" runat="server" CssClass="cart_module_total" >0 VNĐ</asp:Label>
             </td>
        </tr>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tổng cộng:</b></span></td>
            <td align="right"><span class="cart_module_total">
                <asp:Label ID="lb_Sum" runat="server" CssClass="cart_module_total">0 VNĐ</asp:Label></span></td>
        </tr>
     </tbody></table>
</asp:Content>